package com.wanczy.serviceImpl;

import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.wanczy.mapper.ShopMapper;
import com.wanczy.pojo.Goods;
import com.wanczy.pojo.OrderUserGoods;
import com.wanczy.pojo.Shop;
import com.wanczy.service.ShopService;

@Service
public class ShopServiceImpl implements ShopService {
	@Autowired
	private ShopMapper shopMapper;
	
	@Override
	public Shop checkShop(String shopTel) {
		Shop shop = shopMapper.checkShop(shopTel);
		return shop;
	}

	@Override
	public Shop FindByShopId(Integer shopId) {
		Shop shop = shopMapper.FindByShopId(shopId);
		return shop;
	}

	@Override
	public Integer updShopMessage(Shop shop) {
		Integer count = shopMapper.updShopMessage(shop);
		return count;
	}

	@Override
	public List<Goods> findByShopId(Integer shopId) {
		List<Goods> list = shopMapper.findByShopId(shopId);
		return list;
	}

	@Override
	public Goods findByGoodsId(Integer goodsId) {
		Goods goods = shopMapper.findByGoodsId(goodsId);
		return goods;
	}

	@Override
	public Integer updShopGoods(Goods goods) {
		Integer count = shopMapper.updShopGoods(goods);
		return count;
	}

	@Override
	public Integer GoodsDown(Integer goodsId) {
		Integer count = shopMapper.GoodsDown(goodsId);
		return count;
	}

	@Override
	public Integer GoogsUp(Integer goodsId) {
		Integer count = shopMapper.GoogsUp(goodsId);
		return count;
	}

	@Override
	public Integer GoogsDel(Integer goodsId) {
		Integer count = shopMapper.GoogsDel(goodsId);
		return count;
	}

	@Override
	public Integer goodsAdd(Goods goods) {
		Integer count = shopMapper.goodsAdd(goods);
		return count;
	}

	@Override
	public List<OrderUserGoods> findOrder(Integer shopId, Date beginDay, Date endDay) {
		List<OrderUserGoods> list = shopMapper.findOrder(shopId, beginDay, endDay);
		return list;
	}

	@Override
	public Integer fahuo(Integer orderId) {
		Integer count = shopMapper.fahuo(orderId);
		return count;
	}

	@Override
	public int shopRegist(Shop shop) {
		int count = shopMapper.shopRegist(shop);
		return count;
	}

	@Override
	public List<Shop> registCheck(String shopName) {
		List<Shop> list = shopMapper.registCheck(shopName);
		return list;
	}

}
